package com.secxiot.provider.config;

//@EnableWebMvc
//@Configuration
/*public class UnitfiedReturnConfig {

    @RestControllerAdvice(annotations = {RestController.class})
    static class CommonResultResponseAdvice implements ResponseBodyAdvice<Object> {
        @Override
        public boolean supports(MethodParameter methodParameter, Class<? extends HttpMessageConverter<?>> aClass) {
            return true;
        }

        @Override
        public Object beforeBodyWrite(Object body, MethodParameter methodParameter, MediaType mediaType, Class<? extends HttpMessageConverter<?>> aClass, ServerHttpRequest serverHttpRequest, ServerHttpResponse serverHttpResponse) {
            if (body instanceof ResultVo) {
                return body;
            }
            return new ResultVo<Object>(body);
        }

    }
}*/
